# A program for deciding the tasks to be undertaken by each TA
# Leetcode problems: https://gitee.com/lundechen/cpp_2021/blob/master/Leetcode.md
# Poly exercises: https://gitee.com/lundechen/cpp_2021/blob/master/pdf/LO02_poly_exercices.pdf

import random
import re

random.seed(2021)

TA = '''Huang Zhifan, Huang Yonghui, Zhong Lexing, Shizhu Zexuan, Yu Nanjun, 
Jing Zukuan, Zhu Keyi, Chen Duowen, Li Yuanhao'''

list_TA = list(filter(lambda x: len(x) > 0, re.split(', |\n|,', TA)))

list_tasks = list(map(lambda x: 'Poly Ex' + str(x), range(70, 77))) + \
    list(map(lambda x: 'Leetcode ' + str(x), ['Graph', 'Hashmap', 'Design', 'Iterator']))

task_distribution = dict(zip(random.sample(list_TA, 5), random.sample(list_tasks, 5)))

print(task_distribution)
